<template>
	<view class="classLayout pageBg">
		<custom-nav-bar title="分类"></custom-nav-bar>
		<view class="classify">
			<theme-item v-for="item in classifyList" :key="item._id" :item="item"></theme-item>
		</view>
	</view>
</template>

<script setup>
import {apiGetClassify} from '@/api/apis.js'

//分类数组
const classifyList=ref([])

//发送网络请求获取分类数据
const getClassify = async ()=>{
	let res=await apiGetClassify({
		pageSize:15
	})
	classifyList.value=res.data
}
getClassify()
//分享给好友
onShareAppMessage((e)=>{
	return{
		title:"蝴蝶虾壁纸，精选分类",
		path:"/pages/classify/classify"
	}
})
//分享到朋友圈
onShareTimeline(()=>{
	return{
		title:"蝴蝶虾壁纸，精选分类",
	}
})
</script>

<style lang="scss" scoped>
.classify{
	padding: 30rpx;
	//网格布局
	display: grid;
	gap:15rpx;
	grid-template-columns: repeat(3,1fr);
}
</style>
